package com.ndp.fb.scheduler.job.templatemateriel;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.ec.core.FeedBuilderService;
import com.ndp.fb.constant.ConfigConst;
import com.ndp.fb.scheduler.annotation.CronScheduled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * Created by hexin on 2016/7/20.
 */
@Component
public class TemplateMaterielJob {
    private static Logger logger = LoggerFactory.getLogger(TemplateMaterielJob.class);

    @Reference
    FeedBuilderService feedBuilderService;

    @CronScheduled(cronkey = ConfigConst.SCHEDULE_SCAN_TEMPLATE_MATERIEL_STATUS_CRON, enablekey = ConfigConst.SCHEDULE_SCAN_TEMPLATE_MATERIEL_STATUS_ENABLE)
    public void scanTemplateMaterielStatus() {
        logger.info("定时判断模板物料生成进度");
        feedBuilderService.scanTemplateMaterielStatus();
    }
}
